<h1>Listing documents</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Category</th>
    <th>Summary</th>
    <th>Creator</th>
    <th>Content</th>
  </tr>

<% for document in @documents %>
  <tr>
    <td><%=h document.title %></td>
    <td><%=h document.category_id %></td>
    <td><%=h document.summary %></td>
    <td><%=h document.creator %></td>
    <td><%=h document.content %></td>
    <td><%= link_to 'Show', document %></td>
    <td><%= link_to 'Edit', edit_document_path(document) %></td>
    <td><%= link_to 'Destroy', document, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New document', new_document_path %>
